﻿
<?php
//include ("conexion.php");
include("cap.php");
$idpagina=2;


?>
<div id="templatemo_outer_wrapper">

	<div id="templatemo_wrapper">
<?php
        include("menu.php");
		?>
        <div id="templatemo_main">
        	<div id="content_title_box">
        		<div id="content_top"></div>
            		<div id="content_center">
            	
              
            <?php 
                 if(isset($_SESSION["username"])){
            echo	"<h1>"."Bienvenido " . $_SESSION["username"]."</h1>";						
						
						$user=$_SESSION["username"];
						
						$result = mysql_query("SELECT * FROM productes JOIN clients ON productes.id_clients=clients.id_clients WHERE usuario LIKE '$user'",$conexion);
							echo "<table border = '3' > \n";
							echo "<tr> \n";
								echo "<td><b>Nom</b></td> \n";
								echo "<td><b>Id_Model</b></td> \n";										
								echo "<td><b>Descripció</b></td> \n";	
								
								echo "<td><b>Població</b></td> \n";
								echo "<td><b>Carrer</b></td> \n";								
									
							echo "</tr> \n";
							while ($row = mysql_fetch_array($result)){
						
							echo "<tr> \n";
							
								echo "<td>".$row['nom_producte']."</td>\n";
								echo "<td>".$row['id_model']."</td>\n";								
								echo "<td>".$row['observacions']."</td>\n";	
								echo "<td>".$row['poblacio']."</td>\n";
								echo "<td>".$row['carrer']."</td>\n";
								/*echo "<td>".$row[""]."</td> \n";	*/	
							echo "</tr> \n";
						}
						echo "</table> \n";
						
						
						}
						?>
						 	</div>
               		<div id="content_bottom"></div>
            </div> <!-- end of featured project -->
        </div> <!-- end of main -->
      
		
		</div>
	
		<?php
		include ('footer.php');
		?>

